{layout name="layout" /}
<div class="product-list-container">
    <h1 class="category-title">“{$cname}”类商品列表</h1>
    <ul class="product-grid">
        {foreach name="products" item="data"}
        <li class="product-card">
            <a href="{:Url('user/index/detail',['id' => $data.pId])}" class="product-link">
                <img src="__STATIC__/upload/{$data.pImg}" class="product-image">
                <div class="product-info">
                    <h3 class="product-name">{$data.pName|substr=0,20}</h3>
                    <p class="product-price">￥{$data.pPrice}</p>
                </div>
            </a>
        </li>
        {/foreach}
    </ul>
</div>